<template>
    <div style="padding: 20px">
        <div>
            <div style="margin-top: 20px">
                <span style="margin-right: 20px">作废原因</span>
                <el-select v-model="auditParams.nullifyReason" placeholder="请选择">
                    <el-option
                        v-for="item in nullifyReasonOptions"
                        :key="item"
                        :label="item"
                        :value="item"
                    >
                    </el-option>
                </el-select>
            </div>
        </div>
        <div style="margin-top: 30px; display: flex">
            <span style="margin-right: 20px; white-space: nowrap">作废说明</span>
            <el-input
                type="textarea"
                :rows="4"
                placeholder="请输入内容"
                v-model="auditParams.nullifyDescription"
            >
            </el-input>
        </div>
    </div>
</template>

<script>
import { mapMutations, mapState } from 'vuex'

export default {
    data () {
        return {
            auditParams: {},
            nullifyReasonOptions: ['数据错误', '不符合业务要求', '不该在此功能录入', '其他']
        }
    },
    computed: {
        ...mapState({ _auditParams: 'auditParams' })
    },
    watch: {
        auditParams: {
            handler (val) {
                this.setAuditParams(val)
            },
            deep: true
        }
    },
    created () {
        this.auditParams = this._auditParams
        // alert(JSON.stringify(this._auditParams))
    },
    methods: {
        ...mapMutations(['setAuditParams'])
    }
}
</script>

<style lang="sass" scoped></style>
